<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
  <!-- Bootstrap -->
  <link href="{{ url_for('static', filename='bootstrap/css/bootstrap.min.css', _external=True) }}" rel="stylesheet">
  <!-- Custom styles for this template -->
  <link type="text/css" href="{{ url_for('static', filename='css/dashboard.css') }}" rel="stylesheet">

  {% block title %}
  <title>WINDPLAY OPERATION SYSTEM</title>
  {% endblock %}

  <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="{{ url_for('auth.index') }}">WINDPLAY OPERATION SYSTEM</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav navbar-right">
        {% if current_user.is_authenticated %}
        <li><a href="#">你好 {{ current_user.username }}！</a></li>
        <li><a href="{{ url_for('auth.logout') }}">退出登录</a></li>
        {% else %}
        <li><a href="#">你好，请登录！</a></li>
        <li><a href="{{ url_for('auth.login') }}">登录帐号</a></li>
        {% endif %}
        <li><a href="{{ url_for('auth.regist') }}">注册帐号</a></li>
        <li><a href="#">后台管理</a></li>
      </ul>
      <form class="navbar-form navbar-right">
        <input type="text" class="form-control" placeholder="Search...">
      </form>
    </div>
  </div>
</nav>
<div class="container-fluid">
  <div class="row">
    <div class="col-sm-3 col-md-2 sidebar">
      <div class="nav nav-sidebar">
        <a href="{{ url_for('auth.index') }}" type="button" class="list-group-item">首  页</a>
        <a href="#" type="button" class="list-group-item">资源管理</a>
        <a href="{{ url_for('cfm.set_conf_server') }}" type="button" class="list-group-item">配置管理</a>
        <a type="button" class="list-group-item">自动化运维</a>
      </div>
    </div>
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
      <!-- flash消息 -->
      {% for message in get_flashed_messages() %}
      <div class="alert alert-warning">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        {{ message }}
      </div>
      {% endfor %}
      <!-- //flash消息 -->

      {% block content %}
      <!-- 内容区域 -->
      {% endblock  %}

    </div>
  </div>
</div>

<footer class="footer">
  <div class="container">
    <p class="text-muted">Copyright © 2017-2018 WINDPLAY OPERATION CENTER</p>
  </div>
</footer>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script> -->
<script src="{{ url_for('static', filename='js/jquery.min.js', _external=True) }}"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js', _external=True) }}"></script>
{% block extrajs %}
<!-- 其它脚本 -->
{% endblock  %}
</body>
</html>